class A {
    int a=1;
    String name="A";

}

// 子类 B 继承 A
class B extends A {
    int b=2;
    String name="B";
}

// 子类 C 继承 B
class C extends B {
    int c=3;
    String name="C";

}
// 测试类
public class work02 {
    public static void main(String[] args) {
        C c = new C();
        System.out.println("name: " + c.name);
        System.out.println("c: " + c.c);
    }
}
